<script type="text/javascript">
//<![CDATA[

    $(document).ready(function() {

        var sheepItForm = $('#sheepItForm').sheepIt({
            separator: '',
            allowRemoveLast: true,
            allowRemoveCurrent: true,
            allowRemoveAll: true,
            allowAdd: true,
            allowAddN: true,
            maxFormsCount: 30,
            minFormsCount: 1,
            iniFormsCount: 1,
            continuousIndex: true
        });

    });

    //]]>
</script>
<style type="text/css">
    /*<![CDATA[*/

    a {
        text-decoration:underline;
        color:#00F;
        cursor:pointer;
    }

    #sheepItForm_controls div, #sheepItForm_controls div input {
        float:left;    
        margin-right: 10px;
    }

    td {
        padding:4px;
    }

    /*]]>*/
</style>

<?php echo $this->Form->create('Pedido'); ?>
Su email: <?php echo $this->Form->text('email', array('size' => 40, 'required')); ?>
<?php $hora = date("H:i:s"); ?>
<?php echo $this->Form->hidden('hora', array('value' => $hora)); ?>
<hr>
<table>
    <thead>
        <tr>
            <th>No.</th>
            <th>Url</th>
            <th>Costo</th>
            <th>Peso</th>
            <th>Tax</th>
            <th>Shipping</th>
            <th>&nbsp;</th>
        </tr>
    </thead><!-- sheepIt Form -->
    <tbody id="sheepItForm">
        <!-- Form template-->
        <tr id="sheepItForm_template">
            <th><span id="sheepItForm_label"></span></th>
            <td><?php echo $this->Form->text(null, array('name' => "data[Item][#index#][url]", 'size' => 40, 'placeholder' => 'Escriba una url', 'required')); ?> &nbsp;</td>
            <td><?php echo $this->Form->text(null, array('name' => "data[Item][#index#][costo]", 'size' => 8, 'placeholder' => 0, 'required')); ?> Dol.&nbsp;</td>
            <td><?php echo $this->Form->text(null, array('name' => "data[Item][#index#][peso]", 'size' => 6, 'placeholder' => 0, 'required')); ?> Lb. &nbsp;</td>
            <td><?php echo $this->Form->text(null, array('name' => "data[Item][#index#][tax]", 'size' => 7, 'value' => 0)); ?> Dol. &nbsp;</td>
            <td><?php echo $this->Form->text(null, array('name' => "data[Item][#index#][shipping]", 'size' => 8, 'value' => 0)); ?> Dol.</td>            
            <td><a id="sheepItForm_remove_current" name="sheepItForm_remove_current"><img class="delete" src="<?php echo $this->webroot; ?>img/elim.png" width="24" height="24" border="0" /></a></td>
        </tr><!-- /Form template-->
        <!-- No forms template -->
        <tr id="sheepItForm_noforms_template">
            <td colspan="4">
                No records
            </td>
        </tr><!-- /No forms template-->
    </tbody><!-- /sheepIt Form -->
</table><!-- Controls -->


<div id="sheepItForm_controls">
    <div id="sheepItForm_add">
        <a><button class="mas"><?php echo $this->Html->image('masIcon.png', array('style'=>'padding-top: 2px;')); ?> Adicionar</button></a>
    </div>
    <div id="sheepItForm_remove_last">
        <a><button class="mas"><?php echo $this->Html->image('cross.png'); ?> Quitar</button></a>
    </div>
    <div id="sheepItForm_remove_all">
        <a><span>Quitar Todos</span></a>
    </div>
    <div id="sheepItForm_add_n">
        <input id="sheepItForm_add_n_input" type="text" size="4" />
        <div id="sheepItForm_add_n_button">
            <a><button class="mas"><?php echo $this->Html->image('masIcon.png', array('style'=>'padding-top: 2px;')); ?> Adicionar varios</button></a>
        </div>
    </div>
</div><!-- /Controls -->
<p>&nbsp;</p>
<?php echo $this->Form->end('Enviar Pedido'); ?>